package com.vy.stl.mapper;

import com.vy.stl.entity.Coach;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @create: 2025/08/27 17:14
 * @description:
 */
public interface CoachMapper {

    /**
     * 条件查询教练
     * @param coach
     * @return
     */
    List<Coach> select(Coach coach);

    /**
     * 根据手机号查询教练信息
     * @param phone
     * @return
     */
    //Java中"字符串" ‘字符’；在前端中没有区别
    Coach selectCoachPhone(@Param("phone") String phone);

    /**
     * 添加教练员
     * @param coach
     * @return
     */
    int insert(Coach coach);

    /**
     * 修改教练员信息
     * @param coach
     * @return
     */
    int edit(Coach coach);

    /**
     * 根据id查询教练信息
     * @param id
     * @return
     */
    Coach selectByPrimaryKey(@Param("id") Integer id);

    /**
     * 根据id删除教练
     * @param id
     * @return
     */
    int deleteById(@Param("id") Integer id);
}
